import request from '@/plugin/axios'
import { sysPath } from '@api/sys.common'

// 推荐商品管理
export function getRecommendList(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/recommend/page',
		method: 'post',
		data
	})
}

export function addRecommendProduct(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/recommend/add',
		method: 'post',
		data
	})
}

export function deleteRecommendProduct(params) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/recommend/remove',
		method: 'post',
		params
	})
}

// 限购商品管理
export function getPurchaseLimitList(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/limit/page',
		method: 'post',
		data
	})
}

export function addPurchaseProduct(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/limit/add',
		method: 'post',
		data
	})
}

export function editPurchaseProduct(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/limit/edit',
		method: 'post',
		data
	})
}

export function deletePurchaseProduct(params) {
	return request({
		url: sysPath + '/hx-mart/api/v1/product/sku/sale/limit/remove',
		method: 'post',
		params
	})
}